import {RouteRecordRaw} from 'vue-router'
const constantRoutes: RouteRecordRaw[] = [
    {
        path: '/',
        name: 'Home',
        redirect: '/homePage',
        meta: {
            title: '首页',
            public: true,
        },
        component: () => import('@/views/home/index.vue'),
        children: [
            {
                path: 'homePage',
                name: 'HomePage',
                meta: {
                    title: '首页',
                    public: true,
                },
                component: () => import('@/views/home/components/home/index.vue'),
            },
            {
                path: '/blog',
                name: 'Blog',
                meta: {
                    title: '博客',
                    public: true,
                    // roles: ['admin'],
                },
                component: () => import('@/views/blog/index.vue'),
            },
            {
                path: 'images',
                name: 'Images',
                meta: {
                    title: '图片',
                    public: true,
                    // roles: ['admin'],
                },
                component: () => import('@/views/images/index.vue'),
            },
            {
                path: 'article',
                name: 'Article',
                meta: {
                    title: '文章',
                    public: true,
                },
                component: () => import('@/views/article/index.vue'),
            },
            {
                path: '/detail',
                name: 'Detail',
                meta: {
                    title: '图片详情',
                    public: true,
                    // roles: ['admin'],
                },
                component: () => import('@/views/imagesDetail/index.vue'),
            },
            {
                path: '/articleDetail',
                name: 'ArticleDetail',
                meta: {
                    title: '文章详情',
                    public: true,
                    // roles: ['admin'],
                },
                component: () => import('@/views/articleDetail/index.vue'),
            },
        ],
    },
    {
        path: '/oauth2',
        name: 'Oauth2',
        meta: {
            title: 'Oauth2',
        },
        component: () => import('@/views/oauth2/index.vue'),
    }
]

export {constantRoutes}
